About: "Shape Properties Dialog, 1.0\nTue Jun 09 16:33:34 1998"
CanUnloadScript: 141
UnloadScript: 142
InstallScript: 143
UninstallScript: 144
ExtVersion: 1
)
(AVDLog.2
Name: "ShapeWin"
X: 21
Y: 58
W: 319
H: 218
HelpTopic: "Shape_Properties"
ConstrainedControlNames: 3
ConstrainedControlNames: 4
ConstrainedControlNames: 5
ConstrainedControlNames: 6
ConstrainedControlNames: 7
ConstrainedControlNames: 8
Constraints: 9
Constraints: 10
Constraints: 11
Constraints: 12
Constraints: 13
Constraints: 14
Server: 15
ControlPanel: 16
ObjectTag: 49
Title: "Shape Properties"
EscapeEnabled: 1
AlwaysOnTop: 1
HasTitleBar: 1
Closeable: 1
Activate: "ShapeWin.Activate"
Close: "ShapeWin.Close"
Open: "ShapeWin.Open"
DefaultButton: 50
)
(AVStr.3
S: "Apply"
)
(AVStr.4
S: "Cancel"
)
(AVStr.5
S: "OK"
)
(AVStr.6
S: "delete"
)
(AVStr.7
S: "add"
)
(AVStr.8
S: "Edit"
)
(Numb.9
N: 102.00000000000000
)
(Numb.10
N: 102.00000000000000
)
(Numb.11
N: 102.00000000000000
)
(Numb.12
N: 86.00000000000000
)
(Numb.13
N: 86.00000000000000
)
(Numb.14
N: 86.00000000000000
)
(Nil.15
)
(CPanel.16
Child: 17
Child: 19
Child: 21
Child: 23
Child: 24
Child: 25
Child: 27
Child: 28
Child: 29
Child: 30
Child: 32
Child: 33
Child: 35
ResBox: 36
ResBox: 37
ResBox: 38
ResBox: 39
ResBox: 40
ResBox: 41
ResBox: 42
ResBox: 43
ResBox: 44
ResBox: 45
ResBox: 46
ResBox: 47
ResBox: 48
Listening: 1
)
(AVLBox.17
InternalName: "ShapeList"
Help: "Displays a list of points making up the shape // Displays a list of points making up the shape"
NextControl: 17
ContentKind: 4
Constraints: 0x33
ColumnCount: 1
HorizontalScroll: 1
Listening: 1
VerticalScroll: 1
Select: "ShapeWin.SelectPoint"
SelectionStyle: 18
Apply: "ShapeWin.ApplyPoint"
)
(AVEnum.18
Name: "LISTBOX_SELECTION_MULTIRANGE"
)
(TextLine.19
InternalName: "ShapeType"
Help: "Displays the shape type // Displays the shape type"
Label: "Shape Type"
Constraints: 0x55
Listening: 1
ReadOnly: 1
TextType: 20
Size: 15
NextControl: 15
)
(AVEnum.20
Name: "TEXTLINE_TYPE_ALL"
)
(TextLine.21
InternalName: "NumVertex"
Help: "Displays the number of vertices // Displays the number of vertices"
Label: "# of Vertices"
Constraints: 0x55
Listening: 1
ReadOnly: 1
TextType: 22
Size: 4
NextControl: 15
)
(AVEnum.22
Name: "TEXTLINE_TYPE_INTEGER"
)
(LButn.23
InternalName: "Apply"
Label: "Do not delete the button"
Click: "ShapeWin.Apply"
)
(LButn.24
InternalName: "Cancel"
Help: "Press to return to the inital shape//Press to return to the inital shape"
Label: "Cancel"
Click: "ShapeWin.Cancel"
)
(Butn.25
InternalName: "delete"
Help: "Delete the Selected Point(s) //Delete the Selected Point(s)"
Icon: 26
Click: "ShapeWin.DeletePT"
)
(AVIcon.26
Name: "AlignNone"
Res: "Icons.AlignNone"
)
(LButn.27
InternalName: "OK"
Help: "Press to accept the changes to the shape //Press to accept the changes to the shape"
Label: "OK"
Click: "ShapeWin.OK"
)
(TextLabel.28
InternalName: "aTextLabel17"
Constraints: 0x56
Label: "Edit"
Listening: 1
)
(TextLabel.29
InternalName: "aTextLabel18"
Constraints: 0x56
Label: "Delete"
Listening: 1
)
(Butn.30
InternalName: "add"
Help: "Click to add a new point // Click to add a new point"
Icon: 31
Click: "ShapeWin.Add PT"
)
(AVIcon.31
Name: "AddMatch"
Res: "Icons.AddMatch"
)
(TextLabel.32
InternalName: "aTextLabel20"
Constraints: 0x56
Label: "Add"
Listening: 1
)
(Butn.33
InternalName: "Edit"
Help: "Select to edit the point location //Select to edit the point location "
Icon: 34
Click: "ShapeWin.ApplyPoint"
)
(AVIcon.34
Name: "SelectEdit"
Res: "Icons.SelectEdit"
)
(AVCBox.35
InternalName: "UpdateShape"
Help: "Select this to update the AREA, PERIMETER, and LENGTH fields //Select this to update the AREA, PERIMETER, and LENGTH fields "
Listening: 1
Selected: 1
Label: "Update Shape Attributes"
Constraints: 0x65
)
(RectD.36
Left: 10.00000000000000
Top: 162.00000000000000
Right: 232.00000000000000
Bottom: 30.00000000000000
)
(RectD.37
Left: 8.00000000000000
Top: 27.00000000000000
Right: 164.00000000000000
Bottom: 7.00000000000000
)
(RectD.38
Left: 183.00000000000000
Top: 27.00000000000000
Right: 315.00000000000000
Bottom: 7.00000000000000
)
(RectD.39
Left: 203.00000000000000
Top: 269.00000000000000
Right: 299.00000000000000
Bottom: 241.00000000000000
)
(RectD.40
Left: 216.00000000000000
Top: 213.00000000000000
Right: 312.00000000000000
Bottom: 185.00000000000000
)
(RectD.41
Left: 240.00000000000000
Top: 138.00000000000000
Right: 268.00000000000000
Bottom: 110.00000000000000
)
(RectD.42
Left: 113.00000000000000
Top: 213.00000000000000
Right: 209.00000000000000
Bottom: 185.00000000000000
)
(RectD.43
Left: 272.00000000000000
Top: 70.00000000000000
Right: 303.00000000000000
Bottom: 42.00000000000000
)
(RectD.44
Left: 273.00000000000000
Top: 142.00000000000000
Right: 317.00000000000000
Bottom: 114.00000000000000
)
(RectD.45
Left: 240.00000000000000
Top: 102.00000000000000
Right: 268.00000000000000
Bottom: 74.00000000000000
)
(RectD.46
Left: 273.00000000000000
Top: 110.00000000000000
Right: 310.00000000000000
Bottom: 82.00000000000000
)
(RectD.47
Left: 240.00000000000000
Top: 66.00000000000000
Right: 268.00000000000000
Bottom: 38.00000000000000
)
(RectD.48
Left: 10.00000000000000
Top: 190.00000000000000
Right: 235.00000000000000
Bottom: 162.00000000000000
)
(Nil.49
)
(Nil.50
)
(AVDLog.51
Name: "Circle"
X: 18
Y: 64
W: 309
H: 129
HelpTopic: "Circle_Edit"
ConstrainedControlNames: 52
ConstrainedControlNames: 53
ConstrainedControlNames: 54
ConstrainedControlNames: 55
Constraints: 56
Constraints: 57
Constraints: 58
Constraints: 59
Server: 60
ControlPanel: 61
ObjectTag: 49
Title: "Circle"
EscapeEnabled: 1
AlwaysOnTop: 1
HasTitleBar: 1
Closeable: 1
Close: "ShapeWin.Circle Close"
Open: "ShapeWin.Circle Open"
DefaultButton: 86
)
(AVStr.52
S: "OK"
)
(AVStr.53
S: "aLabelButton9"
)
(AVStr.54
S: "Apply"
)
(AVStr.55
S: "CenterTool"
)
(Numb.56
N: 85.00000000000000
)
(Numb.57
N: 85.00000000000000
)
(Numb.58
N: 85.00000000000000
)
(Numb.59
N: 85.00000000000000
)
(Nil.60
)
(CPanel.61
Child: 62
Child: 74
Child: 76
Child: 77
Child: 78
Child: 79
ResBox: 80
ResBox: 81
ResBox: 82
ResBox: 83
ResBox: 84
ResBox: 85
Listening: 1
)
(CPanel.62
InternalName: "aControlPanel24"
Child: 63
Child: 65
Child: 67
Child: 69
Constraints: 0x55
ResBox: 70
ResBox: 71
ResBox: 72
ResBox: 73
VisibleBorder: 1
Listening: 1
)
(Tool.63
InternalName: "CenterTool"
Help: "Use to enter the center of the circle by pointing in the View // Use to enter the center of the circle by pointing in the View"
Icon: 64
Cursor: "Cursors.Default"
Apply: "ShapeWin.GetPoint from View"
)
(AVIcon.64
Name: "SelectCircle"
Res: "Icons.SelectCircle"
)
(TextLine.65
InternalName: "x"
Text: "0.522242"
Label: "Center X"
Constraints: 0x55
Listening: 1
TextType: 66
Size: 10
NextControl: 60
)
(AVEnum.66
Name: "TEXTLINE_TYPE_REAL"
)
(TextLine.67
InternalName: "y"
Text: "0.688047"
Label: "Center Y"
Constraints: 0x55
Listening: 1
TextType: 68
Size: 10
NextControl: 60
)
(AVEnum.68
Name: "TEXTLINE_TYPE_REAL"
)
(TextLabel.69
InternalName: "aTextLabel23"
Constraints: 0x55
Label: "Select the\ncenter point"
Listening: 1
)
(RectD.70
Left: 195.00000000000000
Top: 36.00000000000000
Right: 219.00000000000000
Bottom: 12.00000000000000
)
(RectD.71
Left: 4.00000000000000
Top: 28.00000000000000
Right: 184.00000000000000
Bottom: 8.00000000000000
)
(RectD.72
Left: 4.00000000000000
Top: 54.00000000000000
Right: 184.00000000000000
Bottom: 34.00000000000000
)
(RectD.73
Left: 225.00000000000000
Top: 45.00000000000000
Right: 298.00000000000000
Bottom: 10.00000000000000
)
(TextLine.74
InternalName: "radius"
Text: "0.112363"
Label: "Radius"
Constraints: 0x55
Listening: 1
TextType: 75
Size: 10
NextControl: 60
)
(AVEnum.75
Name: "TEXTLINE_TYPE_REAL"
)
(LButn.76
InternalName: "OK"
Label: "OK"
Click: "ShapeWin.Circle OK"
)
(LButn.77
InternalName: "aLabelButton9"
Label: "Cancel"
Click: "ShapeWin.Circle Cancel"
)
(LButn.78
InternalName: "Apply"
Label: "Apply"
Click: "ShapeWin.Circle Apply"
)
(TextLabel.79
InternalName: "units"
Constraints: 0x55
Listening: 1
)
(RectD.80
Left: 8.00000000000000
Top: 67.00000000000000
Right: 308.00000000000000
Bottom: 4.00000000000000
)
(RectD.81
Left: 20.00000000000000
Top: 92.00000000000000
Right: 192.00000000000000
Bottom: 72.00000000000000
)
(RectD.82
Left: 8.00000000000000
Top: 125.00000000000000
Right: 90.00000000000000
Bottom: 101.00000000000000
)
(RectD.83
Left: 207.00000000000000
Top: 125.00000000000000
Right: 289.00000000000000
Bottom: 101.00000000000000
)
(RectD.84
Left: 107.00000000000000
Top: 125.00000000000000
Right: 189.00000000000000
Bottom: 101.00000000000000
)
(RectD.85
Left: 204.00000000000000
Top: 100.00000000000000
Right: 300.00000000000000
Bottom: 72.00000000000000
)
(Nil.86
)
(AVDLog.87
Name: "XY Point"
X: 16
Y: 57
W: 284
H: 128
HelpTopic: "Vertex_Point_Edit"
ConstrainedControlNames: 88
ConstrainedControlNames: 89
ConstrainedControlNames: 90
Constraints: 91
Constraints: 92
Constraints: 93
Server: 94
ControlPanel: 95
ObjectTag: 49
Title: "Vertex Point Edit"
EscapeEnabled: 1
AlwaysOnTop: 1
HasTitleBar: 1
Closeable: 1
DefaultButton: 108
)
(AVStr.88
S: "OK"
)
(AVStr.89
S: "cancel"
)
(AVStr.90
S: "LocatePT"
)
(Numb.91
N: 85.00000000000000
)
(Numb.92
N: 85.00000000000000
)
(Numb.93
N: 85.00000000000000
)
(Nil.94
)
(CPanel.95
Child: 96
Child: 108
Child: 109
Child: 110
Child: 112
ResBox: 114
ResBox: 115
ResBox: 116
ResBox: 117
ResBox: 118
Listening: 1
)
(CPanel.96
InternalName: "aControlPanel20"
Child: 97
Child: 98
Child: 100
Child: 102
Constraints: 0x55
ResBox: 104
ResBox: 105
ResBox: 106
ResBox: 107
VisibleBorder: 1
Listening: 1
)
(TextLabel.97
InternalName: "aTextLabel16"
Constraints: 0x55
Label: "Select the\npoint location"
Listening: 1
)
(TextLine.98
InternalName: "y"
Help: "Enter in the new location for the point here // Enter in the new location for the point here"
Text: "00000000"
Label: "y"
Constraints: 0x55
Listening: 1
TextType: 99
NextControl: 94
)
(AVEnum.99
Name: "TEXTLINE_TYPE_REAL"
)
(TextLine.100
InternalName: "x"
Help: "Enter in the new location for the point here // Enter in the new location for the point here"
Text: "00000000"
Label: "x"
Constraints: 0x55
Listening: 1
TextType: 101
NextControl: 94
)
(AVEnum.101
Name: "TEXTLINE_TYPE_REAL"
)
(Tool.102
InternalName: "LocatePT"
Help: "Locate a new point location on the view // Locate a new point location on the view"
Icon: 103
Cursor: "Cursors.CrossHair"
Apply: "ShapeWin.GetPoint from View"
)
(AVIcon.103
Name: "SelectEdit"
Res: "Icons.SelectEdit"
)
(RectD.104
Left: 190.00000000000000
Top: 52.00000000000000
Right: 286.00000000000000
Bottom: 15.00000000000000
)
(RectD.105
Left: 4.00000000000000
Top: 56.00000000000000
Right: 148.00000000000000
Bottom: 36.00000000000000
)
(RectD.106
Left: 4.00000000000000
Top: 30.00000000000000
Right: 148.00000000000000
Bottom: 10.00000000000000
)
(RectD.107
Left: 156.00000000000000
Top: 37.00000000000000
Right: 180.00000000000000
Bottom: 13.00000000000000
)
(LButn.108
InternalName: "OK"
Help: "Press to accept the new point location // Press to accept the new point location"
Label: "OK"
Click: "ShapeWin.Vertex Edit OK"
)
(LButn.109
InternalName: "cancel"
Help: "Press to cancel any changes // Press to cancel any changes"
Label: "Cancel"
Click: "ShapeWin.Vertex Edit Cancel"
)
(TextLine.110
InternalName: "z"
Help: "Enter in the new z for the point here // Enter in the new z for the point here"
Text: "00000"
Label: "Elevation (z)"
Constraints: 0x55
Listening: 1
TextType: 111
Size: 5
NextControl: 94
)
(AVEnum.111
Name: "TEXTLINE_TYPE_REAL"
)
(TextLine.112
InternalName: "m"
Help: "Enter in the new m for the point here // Enter in the new m for the point here"
Text: "00000"
Label: "Measure (m)"
Constraints: 0x55
Listening: 1
TextType: 113
Size: 5
NextControl: 94
)
(AVEnum.113
Name: "TEXTLINE_TYPE_REAL"
)
(RectD.114
Left: 6.00000000000000
Top: 65.00000000000000
Right: 282.00000000000000
Bottom: 4.00000000000000
)
(RectD.115
Left: 105.00000000000000
Top: 124.00000000000000
Right: 187.00000000000000
Bottom: 100.00000000000000
)
(RectD.116
Left: 195.00000000000000
Top: 124.00000000000000
Right: 277.00000000000000
Bottom: 100.00000000000000
)
(RectD.117
Left: 7.00000000000000
Top: 92.00000000000000
Right: 149.00000000000000
Bottom: 72.00000000000000
)
(RectD.118
Left: 154.00000000000000
Top: 92.00000000000000
Right: 282.00000000000000
Bottom: 72.00000000000000
)
(Script.119
Name: "ShapeWin.Activate"
SourceCode: "thedialog=self\nav.clearstatus\nif (thedialog.isOpen.Not) then\n return(nil)\nend\n\n\nif (av.finddialog(\"XY Point\").isOpen) then\n\n av.finddialog(\"XY Point\").activate\n return(nil)\nend\ntheview=av.getactivedoc\n\nif (theview.is(view).not) then\n for each acontrol in theDialog.getcontrolpanel.getcontrols\n if (acontrol.is(ControlPanel)) then\n for each thectl in acontrol.getcontrols\n thectl.setenabled(false)\n end\n else\n acontrol.setenabled(false)\n end\n end\n thedialog.findbyname(\"Can
cel\").setenabled(TRUE)\n \n \n 'self.close\n return(nil)\nelse\n for each acontrol in theDialog.getcontrolpanel.getcontrols\n if (acontrol.is(ControlPanel)) then\n for each thectl in acontrol.getcontrols\n if (thectl.getname<>\"UpdateShape\") then\n thectl.setenabled(TRUE)\n end\n end\n else\n if (acontrol.getname<>\"UpdateShape\") then\n acontrol.setenabled(TRUE)\n end\n end\n' thedialog.findbyname(\"Cancel\").setenabled(TRUE)\n end\nend\n\n\nif (self.getobjecttag.is(l
end\n\n theShape= theSelGraphic.getshape\n theshapesrc=theshape\nelse\n theFtab=thetheme.getftab\n if (theFtab.getselection.count=0) then\n self.close \n end\n thesel=theftab.getselection\n theshpfld=theftab.findfield(\"shape\")\n for each arec in thesel\n theshapesrc=theftab.returnvalue(theshpfld,arec)\n break\n end\nend\n\ntheobjtag=thedialog.findbyname(\"apply\").getobjecttag\n \nif (theshapesrc<>theobjtag) then\n msgbox.warning(\"The selected shape has been changed, the dialog will now re-initalize\",\"Warnin
SourceCode: "thedialog=self.getdialog\nif (av.getactivedoc.is(view).not) then\n return(nil)\nend\n\n\nshapelist=thedialog.findbyname(\"ShapeList\").getlist\nshapetype=thedialog.findbyname(\"ShapeType\").gettext\nthepoint=thedialog.findbyname(\"ShapeList\").getcurrentvalue\n\naloc=shapelist.findbyvalue(thepoint)\n\nif (aloc=-1) then ' why this would happen I don't know?\n newpoint=0@0\n shapelist.add(newpoint)\n\nelse\n newpoint=thepoint.clone\n shapelist.add(newpoint)\n shapelist.shuffle(newpoint,aloc+1)\n\nend\n\nthedialog.findbyname(\"ShapeL
ist\").definefromlist(shapelist)\n\n thepts=av.getactivedoc.getgraphics.findallbyname(\"VertexPoints\")\n if (thepts <> NIL) then\n for each apt in thepts.clone\n av.getactivedoc.getgraphics.removeGraphic(apt)\n end\n end \n\nthedialog.findbyname(\"ShapeList\").gorow(aloc+1)\nthedialog.findbyname(\"ShapeList\").selectcurrent(FALSE)\nthedialog.findbyname(\"ShapeList\").showcurrent\nthedialog.findbyname(\"ShapeList\").select\nthedialog.findbyname(\"Apply\").click\nthedialog.findbyname(\"ShapeList\").apply\n\n"
SourceCode: "thedialog=self.getdialog\nupdateshape=thedialog.findbyname(\"updateshape\")\n\ntheView=av.getactivedoc\nif (theview.is(View)) then\n thepts=av.getactivedoc.getgraphics.findallbyname(\"VertexPoints\")\n if (thepts <> NIL) then\n for each apt in thepts.clone\n av.getactivedoc.getgraphics.removeGraphic(apt)\n end\n end \n'===============================================\n\nif (thedialog.getobjecttag.is(Graphic)) then \n badg=theview.getgraphics.findallbyname(\"TempGraphic\")\n if (badg <> NIL) then\n for each abag
graphic in badg.clone\n theview.getgraphics.removeGraphic(abaggraphic)\n end\n end \n agoodgraphic=self.getdialog.getobjecttag\n if (agoodgraphic.is(graphic)) then\n agoodgraphic.setname(\"\")\n\n agoodgraphic.setselected(TRUE)\n theview.getgraphics.add(agoodgraphic)\n end\n\nelseif ((thedialog.getobjecttag.is(list)) and (thedialog.getobjecttag.get(0).is(FTAB)) ) then\n theTheme = theView.GetEditableTheme\n if (thetheme=NIL) then\n av.finddialog(\"ShapeWin\").close\n return(nil)\n end\n \n theftab=
thedialog.getobjecttag.get(0)\n \n if (thetheme.getftab<>theftab) then\n av.finddialog(\"ShapeWin\").close\n return(nil)\n end\n \n shpfld=theftab.findfield(\"shape\")\n therec=thedialog.getobjecttag.get(1)\n theoldshp=thedialog.getobjecttag.get(2)\n \n if (updateshape.isselected) then\n areafld=theftab.findfield(\"area\")\n lengthfld=theftab.findfield(\"length\")\n perimfld=theftab.findfield(\"perimeter\")\n \n if (shpfld.gettype=#FIELD_SHAPEPOLY) then\n theftab.BeginTransaction\n if (areafld
SourceCode: "thedialog=self.getdialog\ntheview=av.getactivedoc\nif (Theview.is(View).not) then\n return(nil)\nend\n\ncenx=thedialog.findbyname(\"x\").gettext\nceny=thedialog.findbyname(\"y\").gettext\ntheRadius=thedialog.findbyname(\"radius\").gettext\n\n\nfinalshape=circle.make(cenx.asnumber@ceny.asnumber,theRadius.asnumber)\n\n\n badg=theview.getgraphics.findallbyname(\"TempGraphic\")\n if (badg <> NIL) then\n for each abaggraphic in badg.clone\n theview.getgraphics.removeGraphic(abaggraphic)\n end\n end \nagshape=graphicshape.make
SourceCode: "thedialog=self.getdialog\n\ntheView=av.getactivedoc\nif (theview.is(View)) then\n thepts=av.getactivedoc.getgraphics.findallbyname(\"VertexPoints\")\n if (thepts <> NIL) then\n for each apt in thepts.clone\n av.getactivedoc.getgraphics.removeGraphic(apt)\n end\n end \n\n badg=theview.getgraphics.findallbyname(\"TempGraphic\")\n if (badg <> NIL) then\n for each abaggraphic in badg.clone\n theview.getgraphics.removeGraphic(abaggraphic)\n end\n end \n agoodgraphic=self.getdialog.getobjecttag\n if (agoo
SourceCode: "theView=av.getactivedoc\n\nif (theview.is(View)) then\n thepts=av.getactivedoc.getgraphics.findallbyname(\"VertexPoints\")\n if (thepts <> NIL) then\n for each apt in thepts.clone\n av.getactivedoc.getgraphics.removeGraphic(apt)\n end\n end \n av.getactiveGUI.gettoolbar.getcontrols.get(0).select\n\nend\n"
)
(Script.127
Name: "ShapeWin.Circle OK"
SourceCode: "thedialog=self.getdialog\ntheview=av.getactivedoc\nif (Theview.is(View).not) then\n return(nil)\nend\n\ncenx=thedialog.findbyname(\"x\").gettext\nceny=thedialog.findbyname(\"y\").gettext\ntheRadius=thedialog.findbyname(\"radius\").gettext\n\n\nfinalshape=circle.make(cenx.asnumber@ceny.asnumber,theRadius.asnumber)\n\n\n badg=theview.getgraphics.findallbyname(\"TempGraphic\")\n if (badg <> NIL) then\n for each abaggraphic in badg.clone\n theview.getgraphics.removeGraphic(abaggraphic)\n end\n end \nagshape=graphicshape.make
dbyname(\"x\")\nytxt=thedialog.findbyname(\"y\")\nradtxt=thedialog.findbyname(\"Radius\")\n\nthecen=theshape.returncenter\ntherad=theshape.getradius\n\nxtxt.settext(thecen.getx.asstring)\nytxt.settext(thecen.gety.asstring)\nradtxt.settext(therad.asstring)\n\nx=thecen.getx\ny=thecen.gety\n\n\nagraphic=graphicshape.make(x@y)\nthepts=av.getactivedoc.getgraphics.findallbyname(\"VertexPoints\")\nif (thepts <> NIL) then\n for each apt in thepts.clone\n av.getactivedoc.getgraphics.removeGraphic(apt)\n end\nend\nagraphic.getsymbol.setcolor
SourceCode: "theView=av.getactivedoc\n\nif (theview.is(View)) then\n thepts=av.getactivedoc.getgraphics.findallbyname(\"VertexPoints\")\n if (thepts <> NIL) then\n for each apt in thepts.clone\n av.getactivedoc.getgraphics.removeGraphic(apt)\n end\n end \n' av.getactiveGUI.gettoolbar.getcontrols.get(0).select\n\nend\n"
)
(Script.130
Name: "ShapeWin.DeletePT"
SourceCode: "thedialog=self.getdialog\nif (av.getactivedoc.is(view).not) then\n return(nil)\nend\n\n\nshapelist=thedialog.findbyname(\"ShapeList\").getlist\nshapetype=thedialog.findbyname(\"ShapeType\").gettext\nthepoints=thedialog.findbyname(\"ShapeList\").getselection\nif (thepoints.count=0) then\n return(nil)\nend\nthedialog.findbyname(\"ShapeList\").GoFirstSelected \noldrec=thedialog.findbyname(\"ShapeList\").getcurrentrow\n\nif ((shapetype=\"Polygon\") or (shapetype=\"Multi-Polygon\")) then\n amin=3\nelseif ((shapetype=\"Line\") or (shapetype=\"Po
lyLine\") or(shapetype=\"Multi-PolyLine\")) then\n amin=2\nelseif ((shapetype=\"Point\") or (shapetype=\"Multi-Point\")) then\n amin=1\nend\n\nasepstring=\"------Multi-Part Separator -----\"\nsep=shapelist.findbyvalue(asepstring)\navalue=shapelist.count - thepoints.count\n\nif (sep=-1) then\n if ((shapelist.count - thepoints.count) < amin) then\n amin=amin.setformat(\"d\")\n msgbox.error(\"You cannot delete this point, a minimum of \"+amin.asstring+\" points are needed for \"+shapetype+\" shapes.\",\"Error\")\n return(nil)\n end\nels
e ' Multipoint\nnewshape={}\n for each aitem in shapelist\n if (aitem.is(point)) then\n if (thepoints.find(aitem) = -1) then\n newshape.add(aitem)\n end\n else\n if (newshape.count < amin) then\n amin=amin.setformat(\"d\")\n msgbox.error(\"You cannot delete this point, a minimum of \"+amin.asstring+\" points are needed for \"+shapetype+\" shapes.\",\"Error\")\n return(nil)\n else\n newshape={}\n end\n end\n end\nend\n\n thepts=av.getactivedoc.getgraphics.findallbyname(\"Ve
rtexPoints\")\n if (thepts <> NIL) then\n for each apt in thepts.clone\n av.getactivedoc.getgraphics.removeGraphic(apt)\n end\n end \n\n' From here we assume that all the points can be deleted\nfor each athing in thepoints.clone\n shapelist.removeobj(athing)\nend\n\n'shapelist=shapelist - thepoints\nthedialog.findbyname(\"ShapeList\").definefromlist(shapelist)\nthedialog.findbyname(\"ShapeList\").gorow(oldrec-1)\nthedialog.findbyname(\"ShapeList\").selectcurrent(FALSE)\nthedialog.findbyname(\"ShapeList\").showcurrent\n
hapelist})\n if (shapelist.get(0).is(PointM)) then\n if (shapelist.get(0).hasZ) then\n finalshape=polylinez.make({shapelist})\n else\n finalshape=polylinem.make({shapelist})\n end\n else\n finalshape=polyline.make({shapelist})\n end\n \n else\n 'complex polyline\n' msgbox.info(\"complex\",\"\")\n listofpolylines={}\n newshape={}\n for each aitem in shapelist\n if (aitem.is(point)) then\n newshape.add(aitem)\n else\n
listofpolylines.add(newshape)\n newshape={}\n end\n end\n if (shapelist.get(0).is(PointM)) then\n if (shapelist.get(0).hasZ) then\n finalshape=polylinez.make(listofpolylines)\n else\n finalshape=polylinem.make(listofpolylines)\n end\n else\n finalshape=polyline.make(listofpolylines)\n end\n end\n end \n\n \n\nelseif ((shptype=\"Point\") or (shptype=\"Multi-Point\")) then\n if (shapelist.count=1) then\n finalshape=shapelist.get(0)\n
\n else\n if (shapelist.get(0).is(PointM)) then\n if (shapelist.get(0).hasZ) then\n finalshape=multipointz.make(shapelist)\n else\n finalshape=multipointm.make(shapelist)\n end\n else\n finalshape=multipoint.make(shapelist)\n end\n\n end\n \nend\n\nif (thedialog.getobjecttag.is(Graphic)) then \n badg=theview.getgraphics.findallbyname(\"TempGraphic\")\n if (badg <> NIL) then\n for each abaggraphic in badg.clone\n theview.getgraphics.removeGraphic(abaggraphic)\n end\n end \n
heShape.aspolygon.aslist.get(0)\n shplist=poly1.aslist\n typetxt=\"Polygon\"\n numv=shplist.count\n\nelseif (theShape.is(Polygon)) then\n\n if (theshape.aslist.count = 1) then\n Poly1=theShape.aslist.get(0)\n shplist=poly1.aslist\n shplist.removeobj(poly1.aslist.get(0))\n typetxt=\"Polygon\"\n numv=shplist.count\n else\n numv=0\n for each apart in theshape.aslist\n for each apt in apart.aslist\n shplist.add(apt)\n end\n shplist.removeobj(apart.aslist.get(0))\n shplist.add(\"------Mu
lti-Part Separator -----\")\n numv=numv+apart.aslist.count\n end\n \n typetxt=\"Multi-Polygon\"\n end\nelseif (theShape.is(Line)) then\n line1=theshape.aspolyline.aslist.get(0)\n shplist=line1.aslist\n shplist.removeduplicates\n\n typetxt=\"Line\"\n numv=shplist.count\n\nelseif (theShape.is(PolyLine)) then\n'-----------\n if (theshape.aslist.count = 1) then\n pline1=theShape.aslist.get(0)\n shplist=pline1.aslist\n\n typetxt=\"PolyLine\"\n numv=shplist.count\n else\n numv=0\n for each apart in theshape.a
slist\n for each apt in apart.aslist\n shplist.add(apt)\n end\n \n shplist.add(\"------Multi-Part Separator -----\")\n numv=numv+apart.aslist.count\n end\n \n typetxt=\"Multi-Polyline\"\n end\n\nelseif (theShape.is(Point)) then\n' Point1=theShape.aslist\n shplist={theshape}\n typetxt=\"Point\"\n numv=shplist.count\n thedialog.findbyname(\"add\").setenabled(false)\n thedialog.findbyname(\"delete\").setenabled(false)\n\n\nelseif (theShape.is(Multipoint)) then\n\n for each apt in theshape.aslist\n shpl
ist.add(apt)\n end\n numv=theshape.aslist.count\n \n typetxt=\"Multi-Point\"\n\nend\n\nif (shplist.Count > 32000) then\n Msgbox.Error(\"the shape you have selected has too many vertices.\",\"\")\n theDialog.Close\n return nil\nend\nthedialog.findbyname(\"ShapeList\").definefromlist(shplist)\nthedialog.findbyname(\"ShapeType\").settext(typetxt)\nnumv.setformat(\"d\")\nthedialog.findbyname(\"NumVertex\").settext(numv.asstring)\nif (aisGraphics) then\n theselgraphic.setname(\"TempGraphic\")\n TheDialog.setobjecttag(theselgraphic.clone)
SourceCode: "theview=av.getactivedoc\nthedialog=av.finddialog(\"ShapeWin\")\nif (thedialog.isopen) then\n\n '''''''''''''''''''''''''''''''''\n if (thedialog.getobjecttag.is(Graphic)) then \n badg=theview.getgraphics.findallbyname(\"TempGraphic\")\n if (badg <> NIL) then\n for each abaggraphic in badg.clone\n theview.getgraphics.removeGraphic(abaggraphic)\n end\n end \n agoodgraphic=thedialog.getobjecttag\n if (agoodgraphic.is(graphic)) then\n agoodgraphic.setname(\"\")\n \n agoodgraphic.setselect
ed(FALSE)\n theview.getgraphics.add(agoodgraphic)\n end\n\n elseif ((thedialog.getobjecttag.is(list)) and (thedialog.getobjecttag.get(0).is(FTAB)) ) then\n\n theTheme = theView.GetEditableTheme\n if (thetheme<>NIL) then\n \n theftab=thedialog.getobjecttag.get(0)\n \n if (thetheme.getftab<>theftab) then\n \n else\n shpfld=theftab.findfield(\"shape\")\n therec=thedialog.getobjecttag.get(1)\n theoldshp=thedialog.getobjecttag.get(2)\n theftab.BeginTransaction\n
rue)\n thedialog.findbyname(\"Edit\").setenabled(true)\n end\n else\n thedialog.findbyname(\"add\").setenabled(FALSE)\n thedialog.findbyname(\"delete\").setenabled(TRUE)\n thedialog.findbyname(\"Edit\").setenabled(FALSE)\n end\nelse\n thedialog.findbyname(\"add\").setenabled(FALSE)\n thedialog.findbyname(\"delete\").setenabled(FALSE)\n thedialog.findbyname(\"Edit\").setenabled(FALSE)\n\nend\ngplist={}\n\nfor each thepoint in thepoints\n if (thepoint.is(Point).not) then\n continue\n end\n x=thepoint.getx\n y=thepoint.ge
ty\n agraphic=graphicshape.make(x@y)\n\n' agraphic.getsymbol.setcolor(color.getred)\n agraphic.setname(\"VertexPoints\")\n\n gplist.add(agraphic)\n\nend\n\n\nthepts=av.getactivedoc.getgraphics.findallbyname(\"VertexPoints\")\nif (thepts <> NIL) then\n for each apt in thepts.clone\n av.getactivedoc.getgraphics.removeGraphic(apt)\n end\nend\nfor each ag in gplist\n av.getactivedoc.getgraphics.addbatch(ag)\nend\nav.getactivedoc.getgraphics.endbatch\n\n"
ic=theSelGraphics.get(0) \n ' -------------------------\n ' Trap for Graphic Text\n ' -------------------------\n if (theSelGraphic.is(graphicText)) then\n self.close\n av.finddialog(\"ShapeWin\").close\n end\n\n theShape= theSelGraphic.getshape\n theshapesrc=theshape\nelse\n theFtab=thetheme.getftab\n if (theFtab.getselection.count=0) then\n self.close\n av.finddialog(\"ShapeWin\").close\n end\n thesel=theftab.getselection\n theshpfld=theftab.findfield(\"shape\")\n for each arec in thesel\n theshapesrc=
theftab.returnvalue(theshpfld,arec)\n break\n end\nend\n\nif (theshapesrc<>av.finddialog(\"ShapeWin\").findbyname(\"apply\").getobjecttag) then \n msgbox.warning(\"The selected shape has been changed, the dialog will now re-initalize\",\"Warning\")\n av.finddialog(\"ShapeWin\").findbyname(\"apply\").setobjecttag(av.finddialog(\"ShapeWin\").findbyname(\"apply\").getobjecttag)\n av.finddialog(\"ShapeWin\").close\n av.finddialog(\"ShapeWin\").open\n self.close\n\nend\n"
SourceCode: "thedialog=self\ntheview=av.getactivedoc\n\nav.clearstatus\nif (thedialog.isOpen.Not) then\n return(nil)\nend\n\nif (theview.is(view).not) then\n\n for each acontrol in theDialog.getcontrolpanel.getcontrols\n if (acontrol.is(ControlPanel)) then\n for each thectl in acontrol.getcontrols\n thectl.setenabled(false)\n end\n else\n acontrol.setenabled(false)\n end\n thedialog.findbyname(\"Cancel\").setenabled(TRUE)\n end\nelse\n for each acontrol in theDialog.getcontrolpanel.getcontrols\n if (aco
ntrol.is(ControlPanel)) then\n for each thectl in acontrol.getcontrols\n thectl.setenabled(TRUE)\n end\n else\n acontrol.setenabled(TRUE)\n end\n' thedialog.findbyname(\"Cancel\").setenabled(TRUE)\n end\n\n\nend\n"
SourceCode: "'' MyDialogExt.Install\n'' Only install user interface components if a project is open\n'if (av.GetProject = nil) then\n' return nil\n'end\n'\n'' Retrieve the popupitem from the extension (self) and \n'' add it after the first popupset\n'anitem=SELF.get(3)\n'\n'viewGUI = av.GetProject.FindGUI(\"View\")\n'apopupset=viewGUI.GetPopups.findbylabel(\"Menu\")\n'apopupset.add(anitem,99)\n'viewGUI.SetModified(TRUE)"
)
(Script.144
Name: "MyDialogExt.UnInstall"
SourceCode: "'' MyDialogExt.UnInstall\n'if (av.GetProject = nil) then \n' return nil\n'end\n'\n'if (av.GetProject.IsClosing) then\n' return nil\n'end\n'\n'' Remove the button from the button bar\n'apopup = av.findgui(\"view\").GetPopups.findbylabel(\"Menu\")\n'apopup.remove(apopup.findbyscript(\"Shapewin.PopUp Open\"))"